const mongoose = require("mongoose")
// mongoose.set('useFindAndModify', false)
const schema = new mongoose.Schema({
  username: { type: String },
  password: {
    select:false,
    type: String, set: (val) => {
      return require('bcrypt').hashSync(val, 10)
    }
  }
});

module.exports = mongoose.model('AdminUser', schema)

//模型文件
